package com.example.demo;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 25228
 * Date: 2025-04-20
 * Time: 19:21
 */
@RestController
@RequestMapping("/hello" )
public class Hello {

    @RequestMapping("/r1")
    public String age(int age){
        return "age="+age;
    }
    @RequestMapping("/r2")
    public String name1(Person person){
        return " "+person;
    }
    @RequestMapping("/r3/{id}")
    public String id(@PathVariable("id") int id ){
        return "id="+id;

    }
}
